/**
 * 表单设计器----选择菜单
 */
mini.parse();
var tree1 = mini.get("tree1");
tree1.loading();

//确定按钮之前
function onTableOk() {
    var selected = tree1.getSelectedNode();
    console.log(selected);
    return selected; //返回选中的数据给父组件
}

function SetMenuData(set) {
	$.ajax({
	    url: ajaxUrl + "/modular/findAll.do",
	    type: "POST",
	    data: {

	    },
	    success: function (data) {
	        // console.log(data, 'tree');
	        tree1.setData(data.treeDate);
	    	tree1.selectNode(set.modular); 
	    },
	    error: function (data) {
	    }
	});
}

//确定按钮
function onOk(e) {
    CloseWindow("ok");
}
//取消按钮
function onCancel(e) {
    CloseWindow("cancel");
}

function CloseWindow(action) {

    if (window.CloseOwnerWindow)
        return window.CloseOwnerWindow(action);
    else
        window.close();
}
